{extend name="layout" /}
{block name="body"}    
  <div class="row">
    <div class="col-lg-12">
      <div class="card">
        <div class="card-body">
          
          <form action="{:url('add')}" method="post" name="add-form" class="row add-form">
            <div class="form-group col-md-12">
              <label>角色</label>
              <div class="form-controls">
                <div class="">
                  {volist name="groups" id="group"}
                  <div class="custom-control custom-checkbox custom-control-inline">
                    <input type="checkbox" class="custom-control-input" name="group[]" value="{$group.id}" id="group-{$group.id}">
                    <label class="custom-control-label" for="group-{$group.id}">{$group.title}</label>
                  </div>
                  {/volist}
                </div>
                <small class="form-text text-muted">(请选择一个/多个角色)</small>
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="adminname">账户名</label>
              <div class="form-controls">
                <input type="text" class="form-control" id="adminname" name="adminname" value="" placeholder="请输入账户名" />
                <small class="form-text text-muted">(用户名，3-16位字母、数字和下划线_及破折号-!)</small>
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="nickname">昵称</label>
              <input type="text" class="form-control" id="nickname" name="nickname" value="" placeholder="请输入昵称" />
              <small class="form-text text-muted">(可以中文，32个字符以内!)</small>
            </div>
            <div class="form-group col-md-12">
              <label for="password">密码</label>
              <div class="form-controls">
                <input type="password" class="form-control" id="password" name="password" value="" placeholder="请输入密码" />
                <small class="form-text text-muted">(密码，6-20位字母、数字、下划线)</small>
              </div>
            </div>
            <div class="form-group col-md-12">
              <label for="email">邮箱</label>
              <div class="form-controls">
                <input type="text" class="form-control" name="email" id="email" value="" placeholder="请输入邮箱" />
              </div>
            </div>
            <div class="form-group col-md-12">
              <label>状态</label>
              <div class="form-controls clearfix">
                <div class="custom-control custom-radio custom-control-inline">
                  <input type="radio" id="statusOne" name="status" class="custom-control-input" value="0">
                  <label class="custom-control-label" for="statusOne">禁用</label>
                </div>
                <div class="custom-control custom-radio custom-control-inline">
                  <input type="radio" id="statusTwo" name="status" class="custom-control-input" value="1" checked>
                  <label class="custom-control-label" for="statusTwo">启用</label>
                </div>
              </div>
            </div>
            <div class="form-group col-md-12">
              <button type="submit" class="btn btn-primary m-r-5 ajax-post" target-form="add-form">确 定</button>
              <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
            </div>
          </form>
 
        </div>
      </div>
    </div>
    
  </div>
{/block}